package com.ksoft.gfx.items;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class LifeCycleTest extends Activity {
	TextView content;
	StringBuilder sb = new StringBuilder();
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		content = new TextView(this);
		setContentView(content);
		log(new Exception().getStackTrace()[0].getMethodName());
	}
	
	private void log(String text){
		Log.d(getClass().getCanonicalName(), text);
		sb.append(text).append('\n');
		content.setText(sb.toString());
	}
	
	@Override
	protected void onResume() {
		super.onResume();
		log(new Exception().getStackTrace()[0].getMethodName());
	}
	
	@Override
	protected void onPause() {
		super.onPause();
		log(new Exception().getStackTrace()[0].getMethodName());
	}
	
	@Override
	protected void onStop() {
		super.onStop();
		log(new Exception().getStackTrace()[0].getMethodName());
	}
}
